package com.ebelter.bodyfatscale.model;

import java.io.Serializable;

/**
 *  生日模型
 */

public class Birthday  implements Serializable{
    private int year;
    private int month;
    private int day;

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public String getFatterDay(){
        return getYear() + "-" + getMonthStr() + "-" + getDayStr();
    }

    @Override
    public String toString() {
        return "Birthday{" +
                "year=" + year +
                ", month=" + month +
                ", day=" + day +
                '}';
    }

    public String getMonthStr() {
        String monthStr;
        if (month<10){
            monthStr="0"+month;
        }else {
            monthStr=month+"";
        }
        return monthStr;
    }

    public String getDayStr() {
        String dayStr;
        if (day<10){
            dayStr="0"+day;
        }else {
            dayStr=day+"";
        }
        return dayStr;
    }
}
